<script type="text/javascript"><!--//--><![CDATA[//><!--

 	$(document).ready(function() {

		// Setup Form
		$('#form_master').setupForm([
			{ name: 'shu_remark', type: 'text', size: 'long', maxlength: 255 },
			{ name: 'shu_awal', type: 'date', size: 'medium', maxlength: 255 },
			{ name: 'shu_akhir', type: 'date', size: 'medium', maxlength: 255 },
		], <?php echo json_encode($data); ?>);
        
		
        // <?php if($mode=="edit"){ ?>
        // $('#receive_toko_no').readonly();
        // $('#receive_toko_tgl').readonly();

        <?php } ?>
		
		// Set Action Button
		var buttons = [{ label: 'Save', icon: 'save', onclick: function() { 
							$('#form_master').submitForm(	'/'+controller+'/ajax_post', 
							{ detail:[	{ table: 'dtl_sample2', field:['shu_dt_id','shu_id','shu_dt_class','shu_dt_amount']}], 
							onComplete : function(data){ eval('oData = '+data); loadPage('/'+controller+'/Index'); } //loadPage('/'+controller+'/edit/?return_toko_id='+(oData.genid!='' ? oData.genid : $('#return_toko_id').getval()))
														      } 
														); 
						}},
					   { label: 'Close', icon: 'cancel', onclick: function() { loadPage('/'+controller+'/Index'); } }];
		setAction(buttons);
		
		// Create Tab
		$('#tt').tabs({ border:false });  
		
		// Focus at First Object
		
        // 		<?php
 	// 		if (isset($receive_toko_auto)) {
 	// 			?>
		// $('#receive_toko_no').setval(receive_toko_auto);
		// $('#receive_toko_no').readonly(true);
 	// 			<?php
 	// 		};
 	// 	?>

		$('#form_master').focusFirst();

		
    });




//--><!]]></script>

<div id="form_master_message" style="display:none;"></div>
    <table class="tb_form" style="display:none;" cellpadding="0" cellspacing="0">
    <tr>
        <td class="label">Remark</td>
        <td><input id="shu_remark" /></td>
        <td><input type="hidden" id="shu_id" value="<?php echo $data['shu_id'];?>"/></td>
    </tr>
    <tr>
        <td class="label">Mulai</td>
        <td ><input id="shu_awal" /></td>
    </tr>
    <tr>
        <td class="label">Berakhir</td>
        <td><input id="shu_akhir" /></td>
    </tr>         
    </table>
    <div id="tt" class="easyui-tabs" style="min-height:400px;">  
	    <div title="Class" style="overflow:auto;padding:10px;">  
	    	<?php require_once('formdtl.php'); ?>
	    </div>	
	</div>
